package com.hsnn.medstgmini.trading.pur.model;

public enum OrderIsRecepted {

	wait(0, "待收货"), confirmed(1, "已完成"), someDispatched(2, "未到货");

	private int key;
	private String value;

	private OrderIsRecepted(int key, String value) {
		this.key = key;
		this.value = value;
	}

	public static String getName(int key) {
		for (OrderIsRecepted oi : OrderIsRecepted.values()) {
			if (oi.key == key) {
				return oi.value;
			}
		}
		return "";
	}

	public static OrderIsRecepted getOrderType(int key) {
		for (OrderIsRecepted oi : OrderIsRecepted.values()) {
			if (oi.key == key) {
				return oi;
			}
		}
		return null;
	}

	public int getKey() {
		return key;
	}

	public void setKey(int key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}
}
